﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using XCode;
using XCode.DataAccessLayer;

namespace BingZi.HY.Core.Entities.Center
{
	/// <summary>
	/// 店铺友情链接
	/// </summary>
	[Serializable]
	[DataObject]
	[Description("店铺友情链接")]
	[BindTable("app_ShopNetLink", Description = "店铺友情链接", ConnName = "Center", DbType = DatabaseType.SqlServer)]
	public partial class app_ShopNetLink
	{
		#region 属性
		private Int32 _NetLinkID;
		/// <summary>
		/// 编号
		/// </summary>
		[Description("编号")]
		[DataObjectField(true, true, false, 10)]
		[BindColumn(1, "NetLinkID", "编号", "", "int", 10, 0, false)]
		public Int32 NetLinkID
		{
			get { return _NetLinkID; }
			set { if (OnPropertyChange("NetLinkID", value)) _NetLinkID = value; }
		}

		private Int32 _UserID;
		/// <summary>
		/// 所属用户
		/// </summary>
		[Description("所属用户")]
		[DataObjectField(false, false, false, 10)]
		[BindColumn(2, "UserID", "所属用户", "", "int", 10, 0, false)]
		public Int32 UserID
		{
			get { return _UserID; }
			set { if (OnPropertyChange("UserID", value)) _UserID = value; }
		}

		private Int32 _N_LinkType;
		/// <summary>
		/// 链接类型
		/// </summary>
		[Description("链接类型")]
		[DataObjectField(false, false, false, 3)]
		[BindColumn(3, "N_LinkType", "链接类型", "", "tinyint", 3, 0, false)]
		public Int32 N_LinkType
		{
			get { return _N_LinkType; }
			set { if (OnPropertyChange("N_LinkType", value)) _N_LinkType = value; }
		}

		private Int32 _N_ShowOrder;
		/// <summary>
		/// 排序号
		/// </summary>
		[Description("排序号")]
		[DataObjectField(false, false, false, 10)]
		[BindColumn(4, "N_ShowOrder", "排序号", "", "int", 10, 0, false)]
		public Int32 N_ShowOrder
		{
			get { return _N_ShowOrder; }
			set { if (OnPropertyChange("N_ShowOrder", value)) _N_ShowOrder = value; }
		}

		private String _N_SiteName;
		/// <summary>
		/// 网站名称
		/// </summary>
		[Description("网站名称")]
		[DataObjectField(false, false, false, 20)]
		[BindColumn(5, "N_SiteName", "网站名称", "", "nvarchar(20)", 0, 0, true)]
		public String N_SiteName
		{
			get { return _N_SiteName; }
			set { if (OnPropertyChange("N_SiteName", value)) _N_SiteName = value; }
		}

		private String _N_SiteUrl;
		/// <summary>
		/// 网站地址
		/// </summary>
		[Description("网站地址")]
		[DataObjectField(false, false, false, 128)]
		[BindColumn(6, "N_SiteUrl", "网站地址", "", "nvarchar(128)", 0, 0, true)]
		public String N_SiteUrl
		{
			get { return _N_SiteUrl; }
			set { if (OnPropertyChange("N_SiteUrl", value)) _N_SiteUrl = value; }
		}

		private String _N_SiteLogo;
		/// <summary>
		/// 网站标志
		/// </summary>
		[Description("网站标志")]
		[DataObjectField(false, false, true, 128)]
		[BindColumn(7, "N_SiteLogo", "网站标志", "", "nvarchar(128)", 0, 0, true)]
		public String N_SiteLogo
		{
			get { return _N_SiteLogo; }
			set { if (OnPropertyChange("N_SiteLogo", value)) _N_SiteLogo = value; }
		}

		private DateTime _N_LastTime;
		/// <summary>
		/// 最后操作时间
		/// </summary>
		[Description("最后操作时间")]
		[DataObjectField(false, false, false, 3)]
		[BindColumn(8, "N_LastTime", "最后操作时间", "", "datetime", 3, 0, false)]
		public DateTime N_LastTime
		{
			get { return _N_LastTime; }
			set { if (OnPropertyChange("N_LastTime", value)) _N_LastTime = value; }
		}

		private Int32 _N_LastUserID;
		/// <summary>
		/// 最后操作用户
		/// </summary>
		[Description("最后操作用户")]
		[DataObjectField(false, false, false, 10)]
		[BindColumn(9, "N_LastUserID", "最后操作用户", "", "int", 10, 0, false)]
		public Int32 N_LastUserID
		{
			get { return _N_LastUserID; }
			set { if (OnPropertyChange("N_LastUserID", value)) _N_LastUserID = value; }
		}
		#endregion

		#region 获取/设置 字段值
		/// <summary>
		/// 获取/设置 字段值。
		/// 一个索引，基类使用反射实现。
		/// 派生实体类可重写该索引，以避免反射带来的性能损耗
		/// </summary>
		/// <param name="name">字段名</param>
		/// <returns></returns>
		public override Object this[String name]
		{
			get
			{
				switch (name)
				{
					case "NetLinkID" : return _NetLinkID;
					case "UserID" : return _UserID;
					case "N_LinkType" : return _N_LinkType;
					case "N_ShowOrder" : return _N_ShowOrder;
					case "N_SiteName" : return _N_SiteName;
					case "N_SiteUrl" : return _N_SiteUrl;
					case "N_SiteLogo" : return _N_SiteLogo;
					case "N_LastTime" : return _N_LastTime;
					case "N_LastUserID" : return _N_LastUserID;
					default: return base[name];
				}
			}
			set
			{
				switch (name)
				{
					case "NetLinkID" : _NetLinkID = Convert.ToInt32(value); break;
					case "UserID" : _UserID = Convert.ToInt32(value); break;
					case "N_LinkType" : _N_LinkType = Convert.ToInt32(value); break;
					case "N_ShowOrder" : _N_ShowOrder = Convert.ToInt32(value); break;
					case "N_SiteName" : _N_SiteName = Convert.ToString(value); break;
					case "N_SiteUrl" : _N_SiteUrl = Convert.ToString(value); break;
					case "N_SiteLogo" : _N_SiteLogo = Convert.ToString(value); break;
					case "N_LastTime" : _N_LastTime = Convert.ToDateTime(value); break;
					case "N_LastUserID" : _N_LastUserID = Convert.ToInt32(value); break;
					default: base[name] = value; break;
				}
			}
		}
		#endregion

		#region 字段名
		/// <summary>
		/// 取得店铺友情链接字段名的快捷方式
		/// </summary>
		public class _
		{
			///<summary>
			/// 编号
			///</summary>
			public const String NetLinkID = "NetLinkID";

			///<summary>
			/// 所属用户
			///</summary>
			public const String UserID = "UserID";

			///<summary>
			/// 链接类型
			///</summary>
			public const String N_LinkType = "N_LinkType";

			///<summary>
			/// 排序号
			///</summary>
			public const String N_ShowOrder = "N_ShowOrder";

			///<summary>
			/// 网站名称
			///</summary>
			public const String N_SiteName = "N_SiteName";

			///<summary>
			/// 网站地址
			///</summary>
			public const String N_SiteUrl = "N_SiteUrl";

			///<summary>
			/// 网站标志
			///</summary>
			public const String N_SiteLogo = "N_SiteLogo";

			///<summary>
			/// 最后操作时间
			///</summary>
			public const String N_LastTime = "N_LastTime";

			///<summary>
			/// 最后操作用户
			///</summary>
			public const String N_LastUserID = "N_LastUserID";
		}
		#endregion
	}
}